import requests

from api.ihrm_manage_dep_api import IHRMManageDepApi
from common.token_util import TokenUtil


class DepIdUtil:
    @classmethod
    def get_dep_id(cls):
        data = {"name": "测试部门999", "code": "123789"}
        token = TokenUtil.get_token()
        resp = IHRMManageDepApi.add_dep_api(token, data)
        print("resp=", resp.json())
        dep_id = resp.json().get("data").get("id")
        return dep_id
